import { Component, OnInit,Output } from '@angular/core';
import {EventEmitter} from '@angular/core';
import {Service2Service} from '../../service/service2.service'

@Component({
  selector: 'app-test',
  templateUrl: './test.component.html',
  providers:[],
  styleUrls: ['./test.component.css']
})
export class TestComponent implements OnInit {

  @Output() onSend: EventEmitter<string> = new EventEmitter<string>();
  constructor(
    private service2:Service2Service
  ) { }
  sendOut() {
    this.onSend.emit('thisis string')
  }

  ngOnInit(): void {
  }

  getServ(){
    console.log(this.service2.getService())
  }

}
